package uk.co.agileworks.bidpirate.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class Item extends ModelObject {

	private static final long serialVersionUID = 1L;

	@Id
	private Long itemNumber;
	private String description;
	private String imageUrl;
	private String currency;
	private Double price;
	private Date endTime;
	
	public Item() {
		super();
	}
	
	public Item(long itemNumber) {
		super();
		this.itemNumber = itemNumber;
	}
	
	public String getCurrency() {
		return currency;
	}

	public String getDescription() {
		return description;
	}

	public Date getEndTime() {
		return endTime;
	}

	public String getImageUrl() {
		return imageUrl;
	}

	public Long getItemNumber() {
		return itemNumber;
	}

	public Double getPrice() {
		return price;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}

	public void setItemNumber(Long itemNumber) {
		this.itemNumber = itemNumber;
	}

	public void setPrice(Double value) {
		this.price = value;
	}

	public void setCurrencyAndPrice(CurrencyAndPrice currencyAndPrice) {
		setCurrency(currencyAndPrice.getCurrency());
		setPrice(currencyAndPrice.getPrice());
	}

}
